puts "hello i am a tempurature converting AI"


puts "is this tempurature in fahrenheit or celsius?"
unit_of_measurement = gets.chomp.downcase

if unit_of_measurement != "f" && unit_of_measurement != "c"
    puts "you did not enter a valid unit of measurement"
    exit
end 

puts "what is the tempurature?"
tempurature = gets.chomp.to_f
if unit_of_measurement == "fahrenheit"
    converting_temperature = (tempurature - 32) * 5/9
    puts "the tempurature in celsius is #{converting_temperature}"
else
    converting_temperature = (tempurature * 9/5) + 32
    puts "the tempurature in fahrenheit is #{converting_temperature}"
end
